package com.scut.shangxueguan.mapper;

import com.scut.shangxueguan.pojo.Files;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface FileMapper {
    @Insert("insert into file(name, size, create_time) values (#{name}, #{size}, #{createTime})")
    void insertFile(Files fileInfo);

    @Select("select * from file")
    List<Files> getAllFile();

    @Delete("delete from file where name = #{fileName}")
    void deleteFile(String fileName);
}
